#region Summary

// 
// Owner : JackieHan 
// 
// Solution : ResearchTest 
// 
// Project : TestSerializer
// 
// File : Teacher.cs
// 
// CopyRight : Copyright © 2010-2011 Skomart Corporation, All Rights Reserved 
// 
// Summary : Test Serializer  With ExtraTypes
// 
// History : 
//			2011-04-15 16:35:50	    Create 
// 

#endregion

#region Using

using System;
using System.Xml.Serialization;

#endregion

namespace TestSerializer
{
    /// <summary> 
    /// Test Serializer  With ExtraTypes
    /// </summary>
    public class Tearcher
    {
        public static Tearcher GetDefaultInstance()
        {
            return new Tearcher
                       {
                           Name = "Mike",
                           Info = new object[] {new Address {City = "XiaMen"}, new PhoneInfo {PhoneNumber = "12345657"}},
                           Phone = new InteranationalPhone {CountryCode = "China"}
                       };
        }

        public string Name { get; set; }

        [XmlArray(ElementName = "ExtraInfo", IsNullable = true)]
        public object[] Info { get; set; }

        public PhoneInfo Phone { get; set; }
    }

    public class Address
    {
        public string City { get; set; }
    }

    public class PhoneInfo
    {
        public string PhoneNumber { get; set; }
    }

    public class InteranationalPhone:PhoneInfo
    {
        public string CountryCode { get; set; }
    }
}